package com.punai.prodatalibrary.domain;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 高级检索类
 */
public class SearchInfo {
    /**
     * 组件所需类型
     * select : 下拉框
     * input  : 输入框
     * datePicker  : 日期
     * daterange  : 日期范围
     * numberrange  : 数字范围
     * number  : 数字框
     * cascader  : 级联选择器
     */
    private String type;
    /**
     * 标签名
     */
    private String label;
    /**
     * 选填-通用
     * 宽度
     */
    private Integer width;
    /**
     * 对应的属性名
     */
    private String prop;
    /**
     * 是否隐藏
     */
    private Boolean hidden;
    /**
     * 是否禁用
     */
    private Boolean disabled;
    /**
     * 是否清空
     */
    private Boolean clearable;
    /**
     * 占位文本
     */
    private String placeholder;
    /**
     * 日期格式
     */
    private String format;
    /**
     * 数字框
     * 最大最小取值
     */
    private BigDecimal minValue;
    private BigDecimal maxValue;
    /**
     * 下拉框 data
     */
    private List<? extends Object> data;
    /**
     *级联选择器 data
     */
    private List<Cascader> options;
    private Cascader props;

    public SearchInfo() {
    }

    public SearchInfo(String type, String label, String prop,String placeholder) {
        this.type = type;
        this.label = label;
        this.prop = prop;
        this.placeholder = placeholder;
    }

    public static class Cascader {
        private String value;
        private String label;
        /**
         * 展开子级菜单的触发方式
         */
        private String expandTrigger;
        private List<Cascader> children;

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

        public String getLabel() {
            return label;
        }

        public void setLabel(String label) {
            this.label = label;
        }

        public String getExpandTrigger() {
            return expandTrigger;
        }

        public void setExpandTrigger(String expandTrigger) {
            this.expandTrigger = expandTrigger;
        }

        public List<Cascader> getChildren() {
            return children;
        }

        public void setChildren(List<Cascader> children) {
            this.children = children;
        }
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public Integer getWidth() {
        return width;
    }

    public void setWidth(Integer width) {
        this.width = width;
    }

    public String getProp() {
        return prop;
    }

    public void setProp(String prop) {
        this.prop = prop;
    }

    public Boolean getHidden() {
        return hidden;
    }

    public void setHidden(Boolean hidden) {
        this.hidden = hidden;
    }

    public Boolean getDisabled() {
        return disabled;
    }

    public void setDisabled(Boolean disabled) {
        this.disabled = disabled;
    }

    public Boolean getClearable() {
        return clearable;
    }

    public void setClearable(Boolean clearable) {
        this.clearable = clearable;
    }

    public String getPlaceholder() {
        return placeholder;
    }

    public void setPlaceholder(String placeholder) {
        this.placeholder = placeholder;
    }

    public BigDecimal getMinValue() {
        return minValue;
    }

    public void setMinValue(BigDecimal minValue) {
        this.minValue = minValue;
    }

    public BigDecimal getMaxValue() {
        return maxValue;
    }

    public void setMaxValue(BigDecimal maxValue) {
        this.maxValue = maxValue;
    }

    public List<Cascader> getOptions() {
        return options;
    }

    public void setOptions(List<Cascader> options) {
        this.options = options;
    }

    public Cascader getProps() {
        return props;
    }

    public void setProps(Cascader props) {
        this.props = props;
    }

    public List<? extends Object> getData() {
        return data;
    }

    public void setData(List<? extends Object> data) {
        this.data = data;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }
}

